package com.wuxiaofan.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuxiaofan.entity.GatewayRoute;
import com.wuxiaofan.entity.custom.GatewayRouteCustom;
import com.wuxiaofan.mapper.GatewayRouteMapper;
import com.wuxiaofan.util.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;

@Service
public class GatewayRouteService {
    @Autowired
    private GatewayRouteMapper gatewayRouteMapper;
    public GatewayRoute findById(String id){
        return gatewayRouteMapper.selectById(id);
    }

    public GatewayRouteCustom findCountByMap(Map paraMap){
        return gatewayRouteMapper.findCountByMap(paraMap);
    }

    public GatewayRouteCustom findGroupByMap(Map paraMap){
        return gatewayRouteMapper.findGroupByMap(paraMap);
    }

    public List<GatewayRouteCustom> findByMap(Map paraMap){
        return gatewayRouteMapper.findByMap(paraMap);
    }

    public Page<GatewayRouteCustom> findByMap(Map paraMap, Page page){
        return page.setRecords(gatewayRouteMapper.findByMap(paraMap,page));
    }


    public void updateMapById(Map paraMap){
        gatewayRouteMapper.updateMapById(paraMap);
    }
    public void delById(String id){
        gatewayRouteMapper.deleteById(id);
    }

}
